import request from "./request";
const Req = new request()

export function list(page = 0, limit = 10) {
    return Req.get({
        url: '/goodsList',
        data: {
            page,
            limit
        }
    })
}
export function del(_id) {
    return Req.post({
        url: '/goodsDelete',
        data: {
            _id
        }
    })
}
export function add({keywords,name,goods_thumb,goods_desc,pre_price,price,seller_note,add_date}) {
    return Req.post({
        url: '/goodsAdd',
        data: {
            keywords,name,goods_thumb,goods_desc,pre_price,price,seller_note,add_date
        }
    })
}
export function update(comment_count, last_modify_date, goods_banner_imgs, add_date, keywords, is_new, orgin_price, is_real, remain_count, goods_desc, total_sell_count, is_best, seller_note, category_id, is_on_sale, month_sell_count, is_alone_sale, is_hot, price, price_desc, discount_price, goods_thumb, name, detail) {
    return Req.post({
        url: '/goodsUpdate',
        data: {
            comment_count, last_modify_date, goods_banner_imgs, add_date, keywords, is_new, orgin_price, is_real, remain_count, goods_desc, total_sell_count, is_best, seller_note, category_id, is_on_sale, month_sell_count, is_alone_sale, is_hot, price, price_desc, discount_price, goods_thumb, name, detail
        }
    })
}